﻿@model LotteryVoteMVC.Models.ShadowAuthModel
@using LotteryVoteMVC.Utility
@{
    ViewBag.Title = "Edit";
}
<h2>
    Edit</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>ShadowAuthModel</legend>
        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Controller)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Controller)
            @Html.ValidationMessageFor(model => model.Controller)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Action)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Action)
            @Html.ValidationMessageFor(model => model.Action)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.MethodSign)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.MethodSign)
            @Html.ValidationMessageFor(model => model.MethodSign)
        </div>
        <div class="editor-field">
            @Html.CheckBoxListFor(it => it.AuthRole, ViewBag.Roles as MultiSelectList)
            @Html.ValidationMessageFor(it => it.AuthRole)
        </div>
        <div class="editor-field">
            @Html.LabelFor(model => model.DefaultState)
            @Html.CheckBoxFor(model => model.DefaultState)
            @Html.ValidationMessageFor(model => model.DefaultState)
        </div>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
